import config from '@/utils/config';
import { MockMethod } from 'vite-plugin-mock';

// 我的资产
const getMyWallet = {
  url: config.url.wallet,
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: [
        {
          code: 'redPacket',
          icon: 'iconfont icon-hongbao',
          label: '红包',
          value: '21',
        },
        {
          code: 'coupon',
          icon: 'iconfont icon-quan',
          label: '优惠券',
          value: '10',
        },
        {
          code: 'coin',
          icon: 'iconfont icon-taojinbi',
          label: '紫币',
          value: '20000',
        },
        {
          code: 'balance',
          icon: 'iconfont icon-wallet',
          label: '余额',
          value: '10.01',
        },
        {
          code: 'card',
          icon: 'iconfont icon-xinyongqia',
          label: '银行卡',
          value: '1',
        },
      ],
      message: 'success',
    };
  },
};

// 我的余额
const getBalance = {
  url: config.url.wallet_balance,
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: {
        balance: '10',
        withdrawal: '200',
      },
      message: 'success',
    };
  },
};

export default [getMyWallet, getBalance] as MockMethod[];
